/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class SmartRollerCurtain {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010020032';
    }

    get categoryName() {
        return '\u667a\u80fd\u5377\u5e18';
    }

    getAutoStartSwitch(params) {
        return command({
            method: 'getAutoStartSwitch',
            methodId: 'pDrhEcAm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentPosition(params) {
        return command({
            method: 'getCurrentPosition',
            methodId: 'p1vFBbV5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSingleRunTime(params) {
        return command({
            method: 'getSingleRunTime',
            methodId: 'phEq1Dsw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pZgRtGIK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTargetPosition(params) {
        return command({
            method: 'getTargetPosition',
            methodId: 'pGox7xkl',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWorkingStatus(params) {
        return command({
            method: 'getWorkingStatus',
            methodId: 'pghzWY6P',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setAutoStartSwitch(params) {
        return command({
            method: 'setAutoStartSwitch',
            methodId: 'pUPQO3lM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peHyqSv9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTargetPosition(params) {
        return command({
            method: 'setTargetPosition',
            methodId: 'ppAXiVfn',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default SmartRollerCurtain;
